# 过滤器的本质就是函数,用于修改变量显示\格式化\运算等
# 过滤器的使用方式:变量名 | 过滤器     如:{{variable | fiter_name(*args)}}
# 链式调用:{{ "hello world" | reverse | upper }}

from flask import Flask, render_template

app = Flask(__name__)

@app.route('/')
def index():
    list = [1,2,5,3,6]
    html_str = "<h1>我是标题</h1>"
    goods_list = [
        {
            'goods_name':'西瓜',
            'price':12
        },
        {
            'goods_name': '冬瓜',
            'price': 7
        }
    ]
    return render_template('template02.html',
                           list=list,
                           html_str=html_str,
                           goods_list=goods_list)
if __name__ == '__main__':
    app.run(debug=True)